package 星期六;

import java.util.*;

public class 练习3 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("张庆");
        list.add("李信玩家");
        list.add("传奇王者");
        list.add("单身");
        list.add("没有女朋友");
        Set<String> set = new HashSet<>();
        set.addAll(list);
        System.out.println(set);
        Iterator<String> iterator = set.iterator();
            for (String a :set){
                String c = (String)a;
                if (c.equals("单身")){
                    System.out.println(c);
                }



        }


    }
}























        /*
                  //           1111------和下列数字连成10,11,12,13
                  // 01234567890123
        String zc = "guoFuLiXinYYds";
        System.out.println(zc.length());
        System.out.println(zc.charAt(7));
        boolean st = zc.startsWith("guoFu");
        boolean en = zc.endsWith("yyds");
        System.out.println(st);
        System.out.println(en);
        System.out.println(zc.indexOf("F"));
        boolean xt = zc.equals("st");
        zc.split("li",2);
        System.out.println(zc);
        System.out.println(zc.toLowerCase());
        System.out.println(zc.toUpperCase());
        System.out.println(zc.trim());
        boolean bh = zc.contains("dd");
        System.out.println(bh);
        System.out.println(zc.replace("guo","cun"));


         */


